<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
欢迎<div th:if="${user}" th:text="${user.username}"></div>登录
</body>
</html>